package com.youngking.guns.modular.auth.controller.dto;

import com.youngking.guns.modular.system.model.User;
import com.youngking.guns.modular.system.model.Wxuserinfo;

import java.io.PrintWriter;
import java.io.Serializable;

/**
 * 认证的响应结果
 *
 * @author fengshuonan
 * @Date 2017/8/24 13:58
 */
public class AuthResponse implements Serializable {

    private static final long serialVersionUID = 1250166508152483573L;

    /**
     * jwt token
     */
    private final String token;

    /**
     * 用于客户端混淆md5加密
     */
    private final String randomKey;
    private User member;
    private Wxuserinfo wxuserinfo;

    public AuthResponse(String token, String randomKey,User member) {
        this.token = token;
        this.randomKey = randomKey;
        this.member = member;
    }

    public AuthResponse(String token, String randomKey,Wxuserinfo wxuserinfo) {
        this.token = token;
        this.randomKey = randomKey;
        this.wxuserinfo = wxuserinfo;
    }

    public String getToken() {
        return this.token;
    }

    public String getRandomKey() {
        return randomKey;
    }

    public User getMember() {
        return member;
    }

    public Wxuserinfo getWxuserinfo() {
        return wxuserinfo;
    }
}
